<template>
    <div :class="['header']">
        <text :class="[
            title.length > 12 && title.length < 16 ? 'long16' : 'auto',
            title.length >15 && title.length < 18 ? 'long18' : 'auto',
            title.length >17 && title.length < 20 ? 'long20' : 'auto',
            title.length >19 && title.length < 22 ? 'long22' : 'auto'
        ]">{{ title }}</text>
    </div>
</template>

<script>

export default {
    name: "zlcHeader",
    setup(){
        let title = window.modelTitle
        return {
            title
        }
    }
}
</script>

<style scoped lang="less">
.header{
  width: 100%;
  margin: 0 auto;
  height: 92px;
  line-height: 56px;
  font-size: 48px;
    font-family: YouSheBiaoTiHei;
  font-weight: 400;
  Letter-spacing: 2px;
  position: absolute;
  top: 0;
  color: #fff;
  z-index: 2;
  background: url('/src/assets/dwgk/header.png') center no-repeat;
  background-size: 100% 100%;
  margin: 0 auto;
  text-shadow: 0 0 12px rgba(49, 190, 255, 1);
  text-align: center;
  .long16{
    font-size: 40px;
  }
  .long18{
    font-size: 34px;
  }
  .long20{
    font-size: 30px;
  }
  .long22{
    font-size: 28px;
  }
}
</style>
